/*
 * Written by Dustin Striplin
 */

package Model;

import java.util.ArrayList;

import Model.Review;

public class Manuscript {
	
	private String author;
	private String title;
	private String pc;
	private String subpc;
	private String link;	
	private int recommendation;
	private int approval;
	
	private Conference conference;
	
	ArrayList<Review> reviews;
	
	/**
	 * Create a manuscript
	 * @param a_author
	 * @param a_title
	 * @param a_link link to the files location
	 */
	public Manuscript(String a_author, String a_title, String a_link) {
		author = a_author;
		title = a_title;
		link = a_link;
	}
	
	/**
	 * Create a manuscript
	 * @param a_author
	 * @param a_title
	 * @param a_link
	 * @param a_conference
	 */
	public Manuscript(String a_author, String a_title, String a_link, Conference a_conference){
		author = a_author;
		title = a_title;
		link = a_link;
		conference = a_conference;
	}
	
	/**
	 * copy constructor
	 * @param toCopy
	 */
	public Manuscript(Manuscript toCopy) {
		this.author = toCopy.author;
		this.title = toCopy.title;
		this.link = toCopy.link;
		this.conference = new Conference(toCopy.conference);
		this.pc = toCopy.pc;
		this.subpc = toCopy.subpc;
		this.recommendation = toCopy.recommendation;
		this.approval = toCopy.approval;
		this.reviews = toCopy.reviews;
		
	}
	
	/**
	 * Creates a manuscript, and sets it's fields
	 * @param author
	 * @param title
	 * @param conference
	 * @param pc
	 * @param subpc
	 * @param recommendation
	 * @param approval
	 * @param reviews
	 */
	public Manuscript(String author, String title, String link, String pc, String subpc, 
			int recommendation, int approval, Conference conference, ArrayList<Review> reviews) {
		super();
		this.author 		= author;
		this.title 			= title;
		this.conference		= conference;
		this.link 			= link;
		this.pc 			= pc;
		this.subpc 			= subpc;
		this.recommendation	= recommendation;
		this.approval 		= approval;
		this.reviews 		= reviews;   	
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Conference getConference() {
		return conference;
	}

	public void setConference(Conference conference) {
		this.conference = conference;
	}

	public String getPc() {
		return pc;
	}

	public void setPc(String pc) {
		this.pc = pc;
	}

	public String getSubpc() {
		return subpc;
	}

	public void setSubpc(String subpc) {
		this.subpc = subpc;
	}

	public int getRecommendation() {
		return recommendation;
	}

	public void setRecommendation(int recommendation) {
		this.recommendation = recommendation;
	}

	public int getApproval() {
		return approval;
	}

	public void setApproval(int approval) {
		this.approval = approval;
	}

	public ArrayList<Review> getReviews() {
		return reviews;
	}

	public void setReviews(ArrayList<Review> reviews) {
		this.reviews = reviews;
	}
	
	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	@Override
	public String toString() {

		StringBuilder sb = new StringBuilder();
		sb.append("Title=");
		sb.append(title);
		sb.append(", Author=");
		sb.append(author);
		sb.append(", PaperLink=");
		sb.append(link);
		sb.append(", pc=");
		sb.append(pc);
		sb.append(", subpc=");
		sb.append(subpc);
		sb.append("\n recommendation=");
		sb.append(recommendation);
		sb.append(", approval=");
		sb.append(approval);
		sb.append(", conference=");
		sb.append(conference.toString());
		sb.append("\nReviews=");
		sb.append(reviews.toString());
		sb.append("\n\n");
		
		return sb.toString();

	}

}